package com.tbit.uqbike.client.controller;

import com.tbit.uqbike.client.pojo.OrderHelmetLostLog;
import com.tbit.uqbike.client.service.OrderHelmetLostLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @author yao
 * @since 2025/2/28 9:39
 */
@RestController
@RequestMapping("/orderHelmetLostLog")
public class OrderHelmetLostLogController {

    @Autowired
    private OrderHelmetLostLogService orderHelmetLostLogService;

    @GetMapping
    public List<OrderHelmetLostLog> getList() {
        return orderHelmetLostLogService.getList();
    }

    @GetMapping("/{id}")
    public OrderHelmetLostLog getById(@PathVariable Integer id) {
        return orderHelmetLostLogService.getById(id);
    }

    @PostMapping
    public void create(@RequestBody OrderHelmetLostLog log) {
        orderHelmetLostLogService.create(log);
    }

    @PutMapping
    public void update(@RequestBody OrderHelmetLostLog log) {
        orderHelmetLostLogService.update(log);
    }

    @DeleteMapping("/{id}")
    public void delete(@PathVariable Integer id) {
        orderHelmetLostLogService.delete(id);
    }
}
